/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tnviet.proj.jna.stat;

import java.util.Vector;

/**
 *
 * @author Administrator
 */
public class JNStatisticsControllerLoader {
    static Vector controllers = new Vector();
    static void loadDefaultController(){
        controllers.removeAllElements();
        controllers.addElement(new PacketStat());
        controllers.addElement(new NetworkProtocolStat());
        controllers.addElement(new TransportProtocolStat());
        controllers.addElement(new ApplicationProtocolStat());
    }
    public static JNStatisticsController[] getControllers(){
        loadDefaultController();
        JNStatisticsController[] array = new JNStatisticsController[controllers.size()];
        for(int i=0; i<array.length;i++){
            array[i] = (JNStatisticsController)controllers.elementAt(i);
        }
        return array;
    }
    public static JNStatisticsController getControllerAt(int i){
        return (JNStatisticsController)controllers.elementAt(i);
    }
}
